import request from '@/utils/request'

// 查询车辆零部件列表
export function listAttachment(query) {
  return request({
    url: '/vehicle/attachment/list',
    method: 'get',
    params: query
  })
}

// 查询车辆零部件详细
export function getAttachment(id) {
  return request({
    url: '/vehicle/attachment/' + id,
    method: 'get'
  })
}

export function vehicleTypeList() {
  return request({
    url: '/vehicle/attachment/type/list',
    method: 'get'
  })
}

// 新增车辆零部件
export function addAttachment(data) {
  return request({
    url: '/vehicle/attachment',
    method: 'post',
    data: data
  })
}

// 修改车辆零部件
export function updateAttachment(data) {
  return request({
    url: '/vehicle/attachment',
    method: 'put',
    data: data
  })
}

// 删除车辆零部件
export function delAttachment(id) {
  return request({
    url: '/vehicle/attachment/' + id,
    method: 'delete'
  })
}
